<%@ page import="java.util.Date" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page isELIgnored="false" %>
<aside class="sidebar">
    <div class="fixed">
        <div class="widget widget-tabs">
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#notice" aria-controls="notice" role="tab"
                                                          data-toggle="tab">网站公告</a></li>
                <li role="presentation"><a href="#centre" aria-controls="centre" role="tab"
                                           data-toggle="tab">会员中心</a></li>
                <li role="presentation"><a href="#contact" aria-controls="contact" role="tab"
                                           data-toggle="tab">联系站长</a></li>
            </ul>
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane notice active" id="notice">
                    <ul>
                        <%--来自userController--%>
                        <c:forEach items="${front_noticeList}" var="notice">
                            <li>
                                <time datetime="2016-01-04"><fmt:formatDate value="${notice.notice_date}" pattern="MM-dd"></fmt:formatDate> </time>
                                <a href="<%=request.getContextPath()%>/front/notice?notice_id=${notice.notice_id}" >${notice.notice_title}</a></li>
                        </c:forEach>
                    </ul>
                </div>
                <div role="tabpanel" class="tab-pane centre" id="centre">
                    <h4>需要登录才能进入会员中心</h4>
                    <p><a href="javascript:;" class="btn btn-primary">立即登录</a> <a href="javascript:;"
                                                                                  class="btn btn-default">现在注册</a>
                    </p>
                </div>
                <div role="tabpanel" class="tab-pane contact" id="contact">
                    <h2>Email:<br/>
                        <a href="mailto:admin@ylsat.com" data-toggle="tooltip" data-placement="bottom"
                           title="admin@ylsat.com">admin@ylsat.com</a></h2>
                </div>
            </div>
        </div>
        <div class="widget widget_search">
            <form class="navbar-form" action="index" method="post">
                <div class="input-group">
                    <input type="text" name="keyword" value="${keyword}" class="form-control" size="35"
                           placeholder="请输入关键字"
                           maxlength="15" autocomplete="off">
                    <input type="hidden" name="sort_id" value="77">
                    <span class="input-group-btn">

            <button class="btn btn-default btn-search" name="search" type="submit">搜索</button>
            </span></div>
            </form>
        </div>
    </div>
    <div class="widget widget_sentence">
        <h3>每日一句</h3>
        <div class="widget-sentence-content">
            <h4><fmt:formatDate value="${words.words_date}" pattern="yyyy年MM月dd日"></fmt:formatDate></h4>
            <p>${words.words_content}</p>
        </div>
    </div>
    <div class="widget widget_hot">
        <h3>猜你喜欢</h3>
        <ul>
            <c:forEach items="${user_article_list}" var="a">
                <li><a href="<%=request.getContextPath()%>/front/article?article_id=${a.article_id}"><span class="thumbnail"><img class="thumb" data-original="images/excerpt.jpg"
                                                            src="${a.article_img}" alt=""></span><span class="text">${a.article_title}</span><span
                        class="muted"><i class="glyphicon glyphicon-time"></i> <fmt:formatDate value="${a.article_date}" pattern="yyyy-MM-dd"></fmt:formatDate> </span><span class="muted"><i
                        class="glyphicon glyphicon-eye-open"></i> ${a.article_views}</span></a></li>
            </c:forEach>
        </ul>
    </div>
</aside>
